package com.konne.nightmare.FastPublicOpinion.ui.personal.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.core.view.GravityCompat;

import com.konne.nightmare.FastPublicOpinion.R;
import com.konne.nightmare.FastPublicOpinion.base.BaseMvpActivity;
import com.konne.nightmare.FastPublicOpinion.bean.CurrencyBean;
import com.konne.nightmare.FastPublicOpinion.bean.LoginBean;
import com.konne.nightmare.FastPublicOpinion.http.BaseResponse;
import com.konne.nightmare.FastPublicOpinion.mvp.presenter.LoginPresenter;
import com.konne.nightmare.FastPublicOpinion.mvp.view.ILoginView;
import com.konne.nightmare.FastPublicOpinion.utils.LoadProgressDialog;
import com.konne.nightmare.FastPublicOpinion.utils.ToastUtil;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * @Author: chen
 * @UpdateDate: 1/22/22 10:07 AM
 * @UpdateRemark: 个人信息编辑
 */
public class EditPersonalActivity extends BaseMvpActivity<ILoginView, LoginPresenter> implements ILoginView, View.OnClickListener {

    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.tv_right)
    TextView tvRight;
    @BindView(R.id.img_back)
    ImageView imgBack;

    @Override
    protected LoginPresenter createPresenter() {
        return new LoginPresenter();
    }

    @Override
    public int getLayout() {
        return R.layout.activity_edit_personal;
    }

    @Override
    public void initView() {
        tvTitle.setText("编辑个人信息");
        tvRight.setVisibility(View.VISIBLE);
        tvRight.setText("保存");

    }
    @OnClick({R.id.img_back,R.id.tv_right})
    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.img_back:
                finish();
                break;
            case R.id.tv_right:
                ToastUtil.showToast("保存成功");
                finish();
                break;

        }
    }
    @Override
    public void initData(Bundle savedInstanceState) {

    }

    @Override
    public void login(BaseResponse<LoginBean.DataBean> data) {

    }

    @Override
    public void getPhoneActivationMsg(BaseResponse<CurrencyBean> data) {

    }

    @Override
    public String msg() {
        return null;
    }

    @Override
    public String phoneNumber() {
        return null;
    }

    @Override
    public LoadProgressDialog getLoadDialog() {
        return dialog;
    }

    @Override
    public void cancelLoadDialog() {
        if (dialog != null && dialog.isShowing()) {
            dialog.cancel();
        }
    }
}
